package com.gexiaobao.pigeon.ui.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.gexiaobao.pigeon.R
import com.gexiaobao.pigeon.app.model.bean.OrgMatchResponse

/**
 * @Author      : hxw
 * @Date        : 2023/3/9 10:14
 * @Describe    :
 */
class OrgMatchAdapter : BaseQuickAdapter<OrgMatchResponse.ListInfo, BaseViewHolder>(R.layout.item_org_match) {

    override fun convert(holder: BaseViewHolder, item: OrgMatchResponse.ListInfo) {
        holder.setText(R.id.tv_item_race_name, item.name)
        holder.setText(R.id.main_race_list_pass_name_type, item.statusDes)
        holder.setText(R.id.tv_item_race_sponsor, item.sponsor)
        holder.setText(R.id.main_race_list_pass_time, item.createdAt)

        holder.setBackgroundResource(R.id.go_race_pass, R.drawable.border_blue)
        holder.setTextColor(R.id.go_race_pass, context.resources.getColor(R.color.bg_light_bllue))
    }
}